package javabase;

import java.lang.reflect.Array;
import java.util.Arrays;

public class Chapter_06_05 {

	public static void main(String[] args) {
		int array[]= {11,37,12,72,58};
		int i,j,t;
		for(i=0;i<array.length-1;i++)
		{
			for(j=0;j<array.length-i-1;j++)
			{
				if(array[j]>array[j+1])
				{
					t=array[j];
					array[j]=array[j+1];
					array[j+1]=t;
				}
			}
		}
		System.out.println(Arrays.toString(array));

	}

}
